<?php

include('../config.php');
$name = $_GET['name'];
$price = $_GET['price'];
$num = $_GET['num'];
$sql = "insert into shop (name,price,num) values ('$name',$price,$num)";
$res = mysql_query($sql);
if ($res) {
    $arr = array(
        "code" => 200,
        "body" => array(
            "msg" => "添加成功，我的乖乖"
        )
    );
    echo json_encode($arr);
}else{
    $arr = array(
        "code" => 201,
        "body" => array(
            "msg" => "添加失败，我的乖乖"
        )
    );
    echo json_encode($arr);
}




?>